package com.marvels.approve.process.service;

import java.util.List;
import java.util.Map;

import com.marvels.approve.loan.dto.LoanAfterInfoDTO;
import com.marvels.approve.loan.dto.McamLoanApplyInfoDTO;
import com.marvels.approve.manager.dto.OpinionDTO;
import com.marvels.approve.process.dto.FaceSigAppointmentDTO;
import com.marvels.approve.process.dto.FacesigOperationDTO;
import com.marvels.common.exception.MarvelsBusinessException;

/**
 * 面谈/面签操作接口
 * @author Administrator
 *
 */
public interface IFaceCheckAssignmentService {
	/**
	 * 查询面签操作记录
	 * @param loanId
	 * @return
	 */
	public List<FacesigOperationDTO> selectFacesigOperationlog(String loanId) throws MarvelsBusinessException;
	
	/**
	 * 通过进件单号查询单号
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException 
	 */
	public McamLoanApplyInfoDTO searchCmAppCaseByLoanId(String loanId) throws MarvelsBusinessException;
	
	/**
	 * 根据loanId查询还款计划
	 * @param loanId
	 * @return
	 */
	public LoanAfterInfoDTO searchRepaymentPlan(String loanId) throws MarvelsBusinessException;
	
	
	/**
	 * 根据进件单号查询申请金额
	 * @param loanId
	 * @param appointmentId
	 * @return
	 */
	public Map<String,Object> searchAppAmount(String loanId,String appointmentId) throws MarvelsBusinessException;
	
	/**
	 * 获取合同信息
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException 
	 */
	public Map<String,Object> previewLoanCompact(String loanId,String compactType) throws MarvelsBusinessException;
	
	/**
	 * 发送合同
	 * @param loanId
	 * @return
	 */
	public Integer sendLoanCompact(String loanId,String isResend,String appointmentId,String returnCause) throws MarvelsBusinessException;
	

	/**
	 * 重新签订合同
	 * @param loanId
	 * @return
	 */
	public Integer resetCompactSign(FacesigOperationDTO facesigOperationDTO,Boolean isNeedQueryUser) throws MarvelsBusinessException;
	
	public Map<String,Object> getTemplateHTML(String loanId,String templateNo) throws MarvelsBusinessException;

//	public void setApplicationContext(ApplicationContext context) throws MarvelsBusinessException;
	/**
	 * 新增面谈/面签结果
	 * @return
	 */
	public Integer addInterviewResult(FacesigOperationDTO dto) throws MarvelsBusinessException;
	
	/**
	 * 修改预约面签状态
	 * @param appointmentId
	 * @return
	 */
	public Integer modifyCompactAmount(FacesigOperationDTO dto) throws MarvelsBusinessException;

	/**
	 * 开始面签
	 * @param dto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Integer modifyInterviewSignStatus(FaceSigAppointmentDTO dto) throws MarvelsBusinessException;


	public  List<OpinionDTO> queryLoanApplyCaseLogs(String loanId)throws MarvelsBusinessException;
}
